package com.boesch.electroOffice.dataaccess.dao;

import java.sql.Timestamp;
import java.util.List;

import com.boesch.electroOffice.dataaccess.common.IllegalDataAccessException;
import com.boesch.electroOffice.model.electroOffice.Identifier;
import com.boesch.electroOffice.model.electroOffice.WorkingHour;
import com.boesch.electroOffice.model.wrapper.WeekReportEntry;
import com.boesch.electroOffice.model.wrapper.WorkingHoursEntry;
import com.liferay.portal.model.User;

/**
 * This interface allocates all methods for WorkingHourElectroOfficeDaoImpl. The
 * methods are only called by the business layer. If there is an error on
 * executing the method, a illegalDataAccessException will be thrown.
 * 
 * @author Ralph Koster
 * 
 */
public interface WorkingHourDao {

	/**
	 * Reads all working hours by appointmentId
	 * Complete Javadoc
	 * 
	 * @param int appointmentId
	 * @return List<WorkingHour> workingHours
	 * @throws IllegalDataAccessException ex
	 */
	public List<WorkingHour> readWorkingHoursByAppointmentId(int appointmentId) throws IllegalDataAccessException;

	/**
	 * Reads all working hours by appointmentId, StartDate and EndDate
	 * Complete Javadoc
	 * 
	 * @param int appointmentId
	 * @param Timestamp StartDate
	 * @param Timestamp EndDate 
	 * @return List<WorkingHour> workingHours
	 * @throws IllegalDataAccessException ex
	 */
	public List<WorkingHour> readWorkingHoursByAppointmentIdStartDateAndEndDate(long appointmentId, Timestamp startDate, Timestamp endDate)
			throws IllegalDataAccessException;

	/**
	 * Complete Javadoc
	 * 
	 * @param userId
	 * @param startDate
	 * @param endDate
	 * @param Identifier identifier
	 * @return
	 * @throws IllegalDataAccessException
	 */
	public List<WorkingHour> readWorkingHoursByUserIdStartDateEndDateAndIdentifier(long userId, Timestamp startDate, Timestamp endDate, Identifier identifier)
			throws IllegalDataAccessException;

	/**
	 * Complete Javadoc
	 * 
	 * @param userId
	 * @param startDate
	 * @param endDate
	 * @param identifierKind
	 * @return
	 * @throws IllegalDataAccessException
	 */
	public List<WorkingHour> readWorkingHoursByUserIdStartDateEndDateAndIdentifierKind(long userId, Timestamp startDate, Timestamp endDate, String identifierKind)
			throws IllegalDataAccessException;

	/**
	 * Complete Javadoc
	 * 
	 * @param workingHour
	 * @param currentUser
	 * @return
	 * @throws IllegalDataAccessException
	 */
	public String saveWorkingHour(WorkingHour workingHour, User currentUser) throws IllegalDataAccessException;

	/**
	 * Complete Javadoc
	 * 
	 * @param workingHour
	 * @param currentUser
	 * @return
	 * @throws IllegalDataAccessException
	 */
	public String updateWorkingHour(WorkingHour workingHour, User currentUser) throws IllegalDataAccessException;

	/**
	 * Complete Javadoc
	 * 
	 * @param workingHour
	 * @return
	 * @throws IllegalDataAccessException
	 */
	public String deleteWorkingHour(WorkingHour workingHour) throws IllegalDataAccessException;

	/**
	 * Complete Javadoc
	 * 
	 * @param entry
	 * @param currentUser
	 * @return
	 * @throws IllegalDataAccessException
	 */
	public String saveWorkingHoursEntry(WorkingHoursEntry entry, User currentUser) throws IllegalDataAccessException;

	/**
	 * Complete Javadoc
	 * 
	 * @param entry
	 * @param currentUser
	 * @return
	 * @throws IllegalDataAccessException
	 */
	public String deleteWorkingHoursEntry(WorkingHoursEntry entry, User currentUser) throws IllegalDataAccessException;

	/**
	 * Complete Javadoc
	 * 
	 * @param weekReportEntry
	 * @param currentUser
	 * @return
	 * @throws IllegalDataAccessException
	 */
	public String saveWeekReportEntry(WeekReportEntry weekReportEntry, User currentUser) throws IllegalDataAccessException;
}
